﻿using System.Diagnostics;
using System.Reflection;
using System.Windows.Documents;
using System.Windows.Navigation;
using HappyBa.Localization;

namespace HappyBa.Dialogs
{
    /// <summary>
    /// Interaction logic for AboutPage.xaml
    /// </summary>
    public partial class AboutDialog
    {
        public AboutDialog()
        {
            InitializeComponent();
            var ver = Assembly.GetExecutingAssembly().GetName().Version;
            Version.Content = string.Format(HappyBaLang.VersionTemplate, ver.Major, ver.Minor, ver.MajorRevision, ver.MinorRevision);
        }

        private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            using (Process.Start(((Hyperlink)sender).NavigateUri.ToString())) { }
        }

    }
}
